Action hook 'customize_save_{$id_base}'

in WP Core File wp-includes/class-wp-customize-setting.php at line 544

View Source

customize_save_{$id_base}

Action Hook
Description
Fires when the WP_Customize_Setting::save() method is called. The dynamic portion of the hook name, `$id_base` refers to the base slug of the setting name.

Hook Information

File Location wp-includes/class-wp-customize-setting.php View on GitHub
Hook Type Action
Line Number 544

Hook Parameters

Type Name Description
WP_Customize_Setting $setting WP_Customize_Setting instance.

Usage Examples

Basic Usage
<?php
// Hook into customize_save_{$id_base}
add_action('customize_save_{$id_base}', 'my_custom_function', 10, 1);

function my_custom_function($setting) {
    // Your custom code here
}

Source Code Context

wp-includes/class-wp-customize-setting.php:544 - How this hook is used in WordPress core
<?php
 539  		 *
 540  		 * @since 3.4.0
 541  		 *
 542  		 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
 543  		 */
 544  		do_action( "customize_save_{$id_base}", $this );
 545  
 546  		$this->update( $value );
 547  	}
 548  
 549  	/**

PHP Documentation

<?php
/**
		 * Fires when the WP_Customize_Setting::save() method is called.
		 *
		 * The dynamic portion of the hook name, `$id_base` refers to
		 * the base slug of the setting name.
		 *
		 * @since 3.4.0
		 *
		 * @param WP_Customize_Setting $setting WP_Customize_Setting instance.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-includes/class-wp-customize-setting.php
Related Hooks

Related hooks will be displayed here in future updates.